﻿#include<iostream>
#include<list>

void printList(const std::list<int> l)
{
	for (std::list<int>::const_iterator it = l.begin(); it != l.end(); ++it)
	{
		std::cout << *it << " ";
	}
	std::cout << '\n';
}

void test01()
{
	std::list<int>l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(3);
	l1.push_back(4);

	printList(l1);

	std::list<int>l2(++l1.begin() , --l1.end());
	printList(l2);

	std::list<int>l3(l2);
	printList(l3);

	std::list<int>l4(6,666);
	printList(l4);
}

int main()
{
	test01();


	return 0;
}
